﻿
/*========================================================================================
//香港绿瘦国际集团 -- 绿瘦商城
//创建者: 余波
//创建时间：2012年2月15日
//类描述：实体类 ProduceReview (属性说明自动提取数据库字段的描述信息)
//最后修改者:余波
//最后修改时间:2012年2月15日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.Rights.Model
{
    /// <summary>
    /// 实体类 ProduceReview (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "ProduceReview", PrimaryKey = "ProduceReview_ID", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class ProduceReviewInfo : BaseModel
    {
        public ProduceReviewInfo()
        {            
            PrimaryKey = "ProduceReview_ID"; 
			Fields.Add("ProduceReview_ID");//产品评论ID
			Fields.Add("Customer_ID");//客户ID
			Fields.Add("CustomerName");//会员姓名
			Fields.Add("ReviewDate");//评论时间
			Fields.Add("Content");//评论内容
			Fields.Add("Star");//评价等级
			Fields.Add("Reply");//评论回复
			Fields.Add("CheckBy");//评论审核人
			Fields.Add("ChectDate");//评论审核时间
			Fields.Add("IsPublish");//是否发布到产品
			Fields.Add("Produce_ID");//产品ID
			Fields.Add("IsAuto");//IsAuto
			Fields.Add("IP");//IP
			Fields.Add("Area");//Area
			
			
			CanNotNullFields.Add("ProduceReview_ID");//产品评论ID不能为空!				
			
			CanNotNullFields.Add("Produce_ID");//产品ID不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public ProduceReviewInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
            ProduceReview_ID = Guid.NewGuid().ToString();
        }
        #endregion 
		
		#region 成员变量
				
		private string _ProduceReview_ID;//产品评论ID
		private string _Customer_ID;//客户ID
		private string _CustomerName;//会员姓名
		private DateTime? _ReviewDate;//评论时间
		private string _Content;//评论内容
		private string _Star;//评价等级
		private string _Reply;//评论回复
		private string _CheckBy;//评论审核人
		private DateTime? _ChectDate;//评论审核时间
		private bool? _IsPublish;//是否发布到产品
		private string _Produce_ID;//产品ID
		private bool? _IsAuto;//IsAuto
		private string _IP;//IP
		private string _Area;//Area
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// 产品评论ID
        /// </summary>       
		[ModelField(Description = "产品评论ID", Type = typeof(string), ErrorMessage = "产品评论ID信息错误!", FieldType = FieldType.Normal, IsKeyField = true,IsUnique = true, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 36,  DbType = "char", IsNeedRecordModify = true)]
        public virtual string ProduceReview_ID
        {
            get
            {
                return this._ProduceReview_ID;
            }
            set
            {
                if (_ProduceReview_ID != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "ProduceReview_ID", _ProduceReview_ID, value, "char", "产品评论ID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnProduceReview_IDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ProduceReview_ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnProduceReview_IDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ProduceReview_ID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 客户ID
        /// </summary>       
		[ModelField(Description = "客户ID", Type = typeof(string), ErrorMessage = "客户ID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = true, IsAllowNull = true, IsDbGenerated = false, Size = 36,  DbType = "char", IsNeedRecordModify = true)]
        public virtual string Customer_ID
        {
            get
            {
                return this._Customer_ID;
            }
            set
            {
                if (_Customer_ID != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "Customer_ID", _Customer_ID, value, "char", "客户ID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnCustomer_IDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Customer_ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnCustomer_IDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Customer_ID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 会员姓名
        /// </summary>       
		[ModelField(Description = "会员姓名", Type = typeof(string), ErrorMessage = "会员姓名信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string CustomerName
        {
            get
            {
                return this._CustomerName;
            }
            set
            {
                if (_CustomerName != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "CustomerName", _CustomerName, value, "nvarchar", "会员姓名");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnCustomerNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._CustomerName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnCustomerNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _CustomerName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论时间
        /// </summary>       
		[ModelField(Description = "评论时间", Type = typeof(DateTime?), ErrorMessage = "评论时间信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? ReviewDate
        {
            get
            {
                return this._ReviewDate;
            }
            set
            {
                if (_ReviewDate != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "ReviewDate", _ReviewDate, value, "datetime", "评论时间");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnReviewDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ReviewDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnReviewDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ReviewDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论内容
        /// </summary>       
		[ModelField(Description = "评论内容", Type = typeof(string), ErrorMessage = "评论内容信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 600,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Content
        {
            get
            {
                return this._Content;
            }
            set
            {
                if (_Content != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "Content", _Content, value, "nvarchar", "评论内容");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnContentChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Content = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnContentChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Content = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评价等级
        /// </summary>       
		[ModelField(Description = "评价等级", Type = typeof(string), ErrorMessage = "评价等级信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 10,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Star
        {
            get
            {
                return this._Star;
            }
            set
            {
                if (_Star != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "Star", _Star, value, "varchar", "评价等级");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnStarChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Star = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnStarChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Star = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论回复
        /// </summary>       
		[ModelField(Description = "评论回复", Type = typeof(string), ErrorMessage = "评论回复信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 600,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Reply
        {
            get
            {
                return this._Reply;
            }
            set
            {
                if (_Reply != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "Reply", _Reply, value, "nvarchar", "评论回复");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnReplyChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Reply = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnReplyChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Reply = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论审核人
        /// </summary>       
		[ModelField(Description = "评论审核人", Type = typeof(string), ErrorMessage = "评论审核人信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string CheckBy
        {
            get
            {
                return this._CheckBy;
            }
            set
            {
                if (_CheckBy != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "CheckBy", _CheckBy, value, "nvarchar", "评论审核人");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnCheckByChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._CheckBy = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnCheckByChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _CheckBy = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 评论审核时间
        /// </summary>       
		[ModelField(Description = "评论审核时间", Type = typeof(DateTime?), ErrorMessage = "评论审核时间信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime? ChectDate
        {
            get
            {
                return this._ChectDate;
            }
            set
            {
                if (_ChectDate != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "ChectDate", _ChectDate, value, "datetime", "评论审核时间");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnChectDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._ChectDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnChectDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _ChectDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 是否发布到产品
        /// </summary>       
		[ModelField(Description = "是否发布到产品", Type = typeof(bool?), ErrorMessage = "是否发布到产品信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsPublish
        {
            get
            {
                return this._IsPublish;
            }
            set
            {
                if (_IsPublish != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "IsPublish", _IsPublish, value, "bit", "是否发布到产品");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsPublishChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsPublish = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsPublishChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsPublish = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 产品ID
        /// </summary>       
		[ModelField(Description = "产品ID", Type = typeof(string), ErrorMessage = "产品ID信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = true, IsAllowNull = false, IsDbGenerated = false, Size = 36,  DbType = "char", IsNeedRecordModify = true)]
        public virtual string Produce_ID
        {
            get
            {
                return this._Produce_ID;
            }
            set
            {
                if (_Produce_ID != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "Produce_ID", _Produce_ID, value, "char", "产品ID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnProduce_IDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Produce_ID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnProduce_IDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Produce_ID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IsAuto
        /// </summary>       
		[ModelField(Description = "IsAuto", Type = typeof(bool?), ErrorMessage = "IsAuto信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 1,  DbType = "bit", IsNeedRecordModify = true)]
        public virtual bool? IsAuto
        {
            get
            {
                return this._IsAuto;
            }
            set
            {
                if (_IsAuto != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "IsAuto", _IsAuto, value, "bit", "IsAuto");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIsAutoChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IsAuto = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIsAutoChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IsAuto = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IP
        /// </summary>       
		[ModelField(Description = "IP", Type = typeof(string), ErrorMessage = "IP信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string IP
        {
            get
            {
                return this._IP;
            }
            set
            {
                if (_IP != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "IP", _IP, value, "nvarchar", "IP");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIPChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IP = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIPChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IP = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// Area
        /// </summary>       
		[ModelField(Description = "Area", Type = typeof(string), ErrorMessage = "Area信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 500,  DbType = "nvarchar", IsNeedRecordModify = true)]
        public virtual string Area
        {
            get
            {
                return this._Area;
            }
            set
            {
                if (_Area != value)
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("ProduceReview", "Area", _Area, value, "nvarchar", "Area");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnAreaChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Area = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnAreaChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Area = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnProduceReview_IDChanging(ModifyInfo modifyInfo);//产品评论IDProduceReview_ID改变之前发生
        partial void OnProduceReview_IDChanged(ModifyInfo modifyInfo);//产品评论IDProduceReview_ID改变之后发生
		partial void OnCustomer_IDChanging(ModifyInfo modifyInfo);//客户IDCustomer_ID改变之前发生
        partial void OnCustomer_IDChanged(ModifyInfo modifyInfo);//客户IDCustomer_ID改变之后发生
		partial void OnCustomerNameChanging(ModifyInfo modifyInfo);//会员姓名CustomerName改变之前发生
        partial void OnCustomerNameChanged(ModifyInfo modifyInfo);//会员姓名CustomerName改变之后发生
		partial void OnReviewDateChanging(ModifyInfo modifyInfo);//评论时间ReviewDate改变之前发生
        partial void OnReviewDateChanged(ModifyInfo modifyInfo);//评论时间ReviewDate改变之后发生
		partial void OnContentChanging(ModifyInfo modifyInfo);//评论内容Content改变之前发生
        partial void OnContentChanged(ModifyInfo modifyInfo);//评论内容Content改变之后发生
		partial void OnStarChanging(ModifyInfo modifyInfo);//评价等级Star改变之前发生
        partial void OnStarChanged(ModifyInfo modifyInfo);//评价等级Star改变之后发生
		partial void OnReplyChanging(ModifyInfo modifyInfo);//评论回复Reply改变之前发生
        partial void OnReplyChanged(ModifyInfo modifyInfo);//评论回复Reply改变之后发生
		partial void OnCheckByChanging(ModifyInfo modifyInfo);//评论审核人CheckBy改变之前发生
        partial void OnCheckByChanged(ModifyInfo modifyInfo);//评论审核人CheckBy改变之后发生
		partial void OnChectDateChanging(ModifyInfo modifyInfo);//评论审核时间ChectDate改变之前发生
        partial void OnChectDateChanged(ModifyInfo modifyInfo);//评论审核时间ChectDate改变之后发生
		partial void OnIsPublishChanging(ModifyInfo modifyInfo);//是否发布到产品IsPublish改变之前发生
        partial void OnIsPublishChanged(ModifyInfo modifyInfo);//是否发布到产品IsPublish改变之后发生
		partial void OnProduce_IDChanging(ModifyInfo modifyInfo);//产品IDProduce_ID改变之前发生
        partial void OnProduce_IDChanged(ModifyInfo modifyInfo);//产品IDProduce_ID改变之后发生
		partial void OnIsAutoChanging(ModifyInfo modifyInfo);//IsAutoIsAuto改变之前发生
        partial void OnIsAutoChanged(ModifyInfo modifyInfo);//IsAutoIsAuto改变之后发生
		partial void OnIPChanging(ModifyInfo modifyInfo);//IPIP改变之前发生
        partial void OnIPChanged(ModifyInfo modifyInfo);//IPIP改变之后发生
		partial void OnAreaChanging(ModifyInfo modifyInfo);//AreaArea改变之前发生
        partial void OnAreaChanged(ModifyInfo modifyInfo);//AreaArea改变之后发生
		
		#endregion		
		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("ProduceReview", "ProduceReview_ID", ProduceReview_ID);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("ProduceReview", "ProduceReview_ID", ProduceReview_ID);		
			ManageEditURI = ZModel.InitMEditURI("ProduceReview", "ProduceReview_ID", ProduceReview_ID);	
		 	ManageDetailURI = ZModel.InitMDetailURI("ProduceReview", "ProduceReview_ID", ProduceReview_ID);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}